import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ListView04 extends StatelessWidget {
  const ListView04({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("list view 04"),),
      body: Container(
        padding: EdgeInsets.symmetric(vertical: 20),
        child: Column(
          children: [
            const ListTile(title: Text("这个是列表的表头"),),
            Expanded(
                child: ListView.separated(
                    itemBuilder: (BuildContext context,int index) => ListTile(title: Text("$index"),),
                    separatorBuilder: (BuildContext context,int index) => const Divider(color: Colors.green,),
                    itemCount: 200
                ),
            )
          ],
        ),
      ),
    );
  }
}